Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix SSL problem #269

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix SSL problem #269

wants to merge 1 commit into from

Conversation

gcd0318
Copy link

@gcd0318 gcd0318 commented May 22, 2014

fix issue 173. originated by kvvier(https://code.google.com/u/kvvier/) and verified for python3.3 (win) by (https://code.google.com/u/111191101025126589579/), and me for python3.4 (linux)

@@ -826,7 +826,7 @@ def __init__(self, host, port=None, key_file=None, cert_file=None,
http.client.HTTPSConnection.__init__(
self, host, port=port, key_file=key_file,
cert_file=cert_file, timeout=timeout, context=context,
check_hostname=True)
check_hostname=disable_ssl_certificate_validation ^ True)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to !disable_ssl_certificate_validation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so what if disable_ssl_certificate_validation=None

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default is False, so that means someone would have to have intentionally passed in None, which to me falls into the realm of a personal problem, I'd much rather have readable code.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Besides which I don't think that even works:
$ python3.2
Python 3.2.3 (default, Feb 27 2014, 21:31:18)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.

None ^ True
Traceback (most recent call last):
File "", line 1, in
TypeError: unsupported operand type(s) for ^: 'NoneType' and 'bool'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, reasonable. thx

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please merge this!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@superphil0 See #173, this patch is obsolete.

@gcd0318
Copy link
Author

gcd0318 commented Jun 11, 2014

As the modification of !disable_ssl_certificate_validation, I got following error when I try to install:
byte-compiling build/bdist.linux-armv7l/egg/httplib2/init.py to init.cpython-34.pyc
File "build/bdist.linux-armv7l/egg/httplib2/init.py", line 829
check_hostname=!disable_ssl_certificate_validation)
^
SyntaxError: invalid syntax

@micolous
Copy link
Contributor

You probably want not disable_ssl_certificate_validation

@jayvdb
Copy link

jayvdb commented Apr 28, 2015

There is also #289 , which attributes the original author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants